package com.st.sprinbootevent.listener;


import com.st.sprinbootevent.event.UserEvent;
import lombok.Data;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author zhangli
 */
@Component
public class UserListener implements ApplicationListener<UserEvent> {
 
	@Override
	public void onApplicationEvent(UserEvent event) {
		String source = (String) event.getSource();
		System.out.println(this.getClass().getSimpleName()+"监听到："+source);
	}
 
}